#ifndef PICCOLO_VK_FRAME_BUFFER_H
#define PICCOLO_VK_FRAME_BUFFER_H

#include "PiccoloVKCommon.h"

namespace Piccolo
{
    class PiccoloVKDevice;
    class PiccoloVKRenderPass;
    class PiccoloVKImageView;
    class PiccoloVKImage;

    class PiccoloVKFrameBuffer
    {
    public:
        PiccoloVKFrameBuffer(PiccoloVKDevice* device, PiccoloVKRenderPass* renderPass, const std::vector<std::shared_ptr<PiccoloVKImage>>& images, uint32_t width, uint32_t height);
        ~PiccoloVKFrameBuffer();

        bool RecreateFrameBuffer(const std::vector<std::shared_ptr<PiccoloVKImage>>& images, uint32_t width, uint32_t height);

        VkFramebuffer GetFrameBuffer() const { return mFramebuffer; }
        uint32_t GetWidth() const { return mWidth; }
        uint32_t GetHeight() const { return mHeight; }

    private:
        VkFramebuffer mFramebuffer;
        PiccoloVKDevice* mDevice;
        PiccoloVKRenderPass* mRenderPass;
        uint32_t mWidth;
        uint32_t mHeight;

        std::vector<std::shared_ptr<PiccoloVKImage>> mImages;
        std::vector<std::shared_ptr<PiccoloVKImageView>> mImageViews;
    };
}

#endif